

#ifndef _TF_NODE_
#define _TF_NODE_

#include "tf_Point.h"
#include "tf_Geom_Object_Manager.h"

class dllDeclspec TfNode :public TfGeomObject
{
public:
	TfNode();
	TfNode(TfPoint const& pt);
	TfNode(double pt[3]);
	~TfNode();

	TfPoint const& GetPoint() const;
	void GetPoint(double pt[3]) const;

	void SetPoint(TfPoint& pt);
	void SetPoint(double pt[3]);

	TfNode& operator=(TfNode const& rhs);

	friend class TfNodeManager;
private:
	TfPoint m_pt;
};


class dllDeclspec TfNodeManager : public TfGeomObjectManager
{
protected:
	TfNodeManager();
public:
	~TfNodeManager();
	
public:
	
	int  CreateNode(double pt[3]);
	int  CreateNode(TfPoint& pt);

	void DeleteNode(int id);
	void DeleteNodes(IntVector& ids);

	void GetNodePoint(int id,double pt[3]);
	void AddToDataBase(int idx, TfGeomObject* obj);
	void AdditionSpace();


	static TfNodeManager* Instance();
};

#define TfNdMng (*TfNodeManager::Instance())





#endif

